<!DOCTYPE HTML>
<html>
  <head>
    <title>视频详情</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="/stylesheets/style.css">
    <link href="http://apps.bdimg.com/libs/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet">
    <script src="http://apps.bdimg.com/libs/jquery/2.0.0/jquery.min.js"></script>
    <script src="http://apps.bdimg.com/libs/bootstrap/3.3.0/js/bootstrap.min.js"></script>

    <link href="/stylesheets/font-awesome.min.css" rel="stylesheet">
  </head>
  <body class="con-bgx">
      <input type="hidden" value="<%=wx_id%>" id="wx_id"/>

      <div class="container video-pt">
          <div class="row btop">
              <img src="/stylesheets/img/top.jpg" alt="防艾">
              <div class="thumbnail">
                  <video x5-playsinline="" playsinline="" webkit-playsinline="" x-webkit-airplay="allow" poster="" preload="load" controls="" width="100%" height="100%" autoplay="autoplay">
                      <source src="<%=sfile.get('src')%>" type="video/mp4"/>
                  </video>
                  <!-- <span class="videost"></span> -->
              </div>
          </div>
          <div class="row video-xq">
              <div class="col-xs-3 text-right">
                  <img src="<%=sfile.get('logo')%>" alt="logo">
              </div>
              <div class="col-xs-9">
                  <h3><%=sfile.get('title')%></h3>
                  <p><span id="piaonum"><%=sfile.get('clicknum')%></span>票</p>
              </div>
              <div class="col-xs-12 text-center tp-btn">
                  <!-- <button type="button" class="btn btn-tp"><i class="fa fa-heart"></i>&nbsp;给他投票</button> -->
                  <button id="tbutton" type="button" class="btn btn-lg <%if(!!isT){%>bt-ccc<% }else{%>btn-tp toupiao<%}%>" data-id="<%=sfile.id%>"><i class="fa fa-heart"></i>&nbsp;<%if(!!isT){%>投过了<%}else{%>给他投票<%}%></button>
              </div>
          </div>

          <div class="video-text text-center">
              <h2>主办单位</h2>
              <p>无锡市艾滋病防治工作委员会办公室</p>
              <p>无锡市卫生和计划生育委员会</p>
              <p>无锡市教育局 &nbsp;&nbsp;共青团无锡市委员会</p>
              <p>无锡市科学技术委员会 &nbsp;&nbsp;无锡市红十字会</p>
              <h2>承办单位</h2>
              <p>无锡市预防医学会 &nbsp;&nbsp;无锡市计划生育协会</p>
              <p>无锡市疾病预防控制中心</p>
              <!-- <p>无锡市计划生育协会</p> -->
          </div>
      </div>
    <script>
    $(function(){
     $(".toupiao").one('click',function(){
       $.ajax({
         url:"/vote",
         async:false,
         type:"POST",
         dataType:"json",
         data:{
           wx_id:$("#wx_id").val(),
           movie_id:$(this).attr('data-id'),
         },
         success:function(data){
          alert(data.staus);
          if(data.ist==0){
            $("#piaonum").html(Number($("#piaonum").html())+1);
          }
          $("#tbutton").html('<i class="fa fa-heart"></i>&nbsp;已投票');
          $("#tbutton").removeClass('btn-tp toupiao');
          $("#tbutton").addClass('bt-ccc');
         },
       })
     })
    })
    </script>
  </body>
</html>
